package com.pulse.base.controller;

import com.pulse.base.domain.UserTestParam;
import com.pulse.base.service.IUserTestParamService;
import com.pulse.common.core.controller.BaseController;
import com.pulse.common.core.domain.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/base/userTestParam")
public class UserTestParamController extends BaseController {

    @Autowired
    private IUserTestParamService userTestParamService;

    /**
     * 根据设备id和端口号查询
     * @param deviceNo
     * @param channel
     * @return
     */
    @GetMapping("/getTestParam/{deviceNo}/{channel}")
    public AjaxResult getTestParam(@PathVariable("deviceNo")String deviceNo,@PathVariable("channel")Integer channel){
        UserTestParam userTestParam  = userTestParamService.getTestParam(deviceNo,channel);
        return success(userTestParam);
    }
}
